import request from '@/utils/request'

// 查询审核流程列表
export function listMyCheck(query) {
  return request({
    url: '/asset/flowCheck/my',
    method: 'get',
    params: query
  })
}
// 查询审核流程列表
export function listFlowCheck(query) {
  return request({
    url: '/asset/flowCheck/list',
    method: 'get',
    params: query
  })
}

// 查询审核流程详细
export function getFlowCheck(id) {
  return request({
    url: '/asset/flowCheck/' + id,
    method: 'get'
  })
}

// 新增审核流程
export function addFlowCheck(data) {
  return request({
    url: '/asset/flowCheck',
    method: 'post',
    data: data
  })
}

// 修改审核流程
export function updateFlowCheck(data) {
  return request({
    url: '/asset/flowCheck',
    method: 'put',
    data: data
  })
}

// 删除审核流程
export function delFlowCheck(id) {
  return request({
    url: '/asset/flowCheck/' + id,
    method: 'delete'
  })
}

// 提交进入审核流程
export function submitCheck(id) {
  return request({
    url: '/asset/flowCheck/submit/'+id,
    method: 'get'
  })
}


// 批量审核
export function batchCheck(data) {
  return request({
    url: '/asset/flowCheck/batch',
    method: 'post',
    data: data
  })
}

// 单个审核
export function checkFlow(data) {
  return request({
    url: '/asset/flowCheck/check',
    method: 'post',
    data: data
  })
}
